package com.bootdo.system.controller;

import com.bootdo.app.service.UserMeetingService;
import com.bootdo.common.utils.PageUtils;
import com.bootdo.common.utils.Query;
import com.bootdo.system.domain.TbWxUserMeeting;
import com.bootdo.system.domain.UserDO;
import com.bootdo.system.domain.WithdrawDO;
import com.bootdo.system.service.MeetingService;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

/**
 * @author huangyalou
 * @date 2021/2/7 19:24
 * @desc
 */
@Controller
@RequestMapping("/system/meeting")
public class MeetingController {

    @Autowired
    private MeetingService meetingService;


    @GetMapping("")
    @RequiresPermissions("system:meeting:meeting")
    String Withdraw(){
        return "system/meeting/meeting";
    }

    @ResponseBody
    @GetMapping("/list")
    @RequiresPermissions("system:meeting:meeting")
    public PageUtils list(@RequestParam Map<String, Object> params){
        //查询列表数据
        Query query = new Query(params);
        List<TbWxUserMeeting> withdrawList = meetingService.list(query);
        int total = meetingService.count(query);
        PageUtils pageUtils = new PageUtils(withdrawList, total);
        return pageUtils;
    }


}
